package com.itheima.自习.第一次.第十四题;

/**
 * @author zhengchangshuo@gitee.com
 * */
public class Dame14 {
    public static void main(String[] args) {
        SmartPhone o = new SmartPhone("大米",2000);
        System.out.println("品牌：" + o.getBrand() + ",价格：" + o.getPrice() + ",尺寸：" + o.SIZE);
        o.call();
        o.sendMessage();
    }
}
//【手机Phone】带有（属性:品牌brand,价格price）
//                （行为:打电话call,发短信sendMessage,玩游戏playGame）
class Phone{
    private String brand;
    private double price;
    public final int SIZE = 6;

    public void call(){
        System.out.println("打电话");
    }

    public void sendMessage(){
        System.out.println("发短信");
    }

    public void playGame(){
        System.out.println("玩游戏");
    }

    public Phone() {
    }

    public Phone(String brand, double price) {
        this.brand = brand;
        this.price = price;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
//【智能手机SmartPhone】需要在手机的功能之上，将打电话的功能做进一步增强（视频通话）
class SmartPhone extends Phone {
    public SmartPhone() {
    }

    public SmartPhone(String brand, double price) {
        super(brand, price);
    }

    @Override
    public void call(){
        super.call();
        System.out.println("视频通话");
    }
}
